package com.elio.seatademoaccount.controller;

import com.elio.seatademoaccount.AccountTblService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName : AccountController
 * @Description : 账户
 * @Author : zhaowenyi
 * @Date: 2021/08/13
 */
@RestController
public class AccountController {

    @Autowired
    AccountTblService accountTblService;

    @PostMapping("/api/account/debit")
    public void debit(@RequestParam("userId") String userId,
                      @RequestParam("money")  int money) {
        accountTblService.debit(userId, money);
    }
}
